Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static GUE encapsulation #1234

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

danameme
Copy link
Contributor

Change Scope

  • Create next-hop-groups and next-hops under network instance to mimic existing AFT tree. This will allow systems to configure these in a network instance.
  • Add a new container that allows static route configuration to point to next-hop-group. This will allow system to add encapsulation headers to packets.

Platform Implementations

  • Arista support for GUE encapsulation.

Tree view

@@ -3427,40 +3427,150 @@
         |  |     +--ro state
         |  |     |  +--ro interface-id?                 oc-if:interface-id
         |  |     |  +--ro apply-forwarding-policy?      -> ../../../../policies/policy/config/policy-id
         |  |     |  +--ro apply-vrf-selection-policy?   -> ../../../../policies/policy/config/policy-id
         |  |     +--rw interface-ref
         |  |        +--rw config
         |  |        |  +--rw interface?      -> /oc-if:interfaces/interface/name
         |  |        |  +--rw subinterface?   -> /oc-if:interfaces/interface[oc-if:name=current()/../interface]/subinterfaces/subinterface/index
         |  |        +--ro state
         |  |           +--ro interface?      -> /oc-if:interfaces/interface/name
         |  |           +--ro subinterface?   -> /oc-if:interfaces/interface[oc-if:name=current()/../interface]/subinterfaces/subinterface/index
         |  +--rw path-selection-groups
         |     +--rw path-selection-group* [group-id]
         |        +--rw group-id    -> ../config/group-id
         |        +--rw config
         |        |  +--rw group-id?   string
         |        |  +--rw mpls-lsp*   -> ../../../../../mpls/lsps/constrained-path/tunnels/tunnel/config/name
         |        +--ro state
         |           +--ro group-id?   string
         |           +--ro mpls-lsp*   -> ../../../../../mpls/lsps/constrained-path/tunnels/tunnel/config/name
+        +--rw next-hop-groups
+        |  +--rw next-hop-group* [name]
+        |     +--rw name         -> ../config/name
+        |     +--rw config
+        |     |  +--rw name?            string
+        |     |  +--rw id?              uint64
+        |     |  +--rw programmed-id?   uint64
+        |     +--ro state
+        |     |  +--ro name?            string
+        |     |  +--ro id?              uint64
+        |     |  +--ro programmed-id?   uint64
+        |     +--rw next-hops
+        |        +--rw next-hop* [index]
+        |           +--rw index     -> ../config/index
+        |           +--rw config
+        |           |  +--rw index?    -> ../../../../../../next-hops/next-hop/config/index
+        |           |  +--rw weight?   uint64
+        |           +--ro state
+        |              +--ro index?    -> ../../../../../../next-hops/next-hop/config/index
+        |              +--ro weight?   uint64
+        +--rw next-hops
+        |  +--rw next-hop* [index]
+        |     +--rw index            -> ../config/index
+        |     +--rw config
+        |     |  +--rw index?              uint64
+        |     |  +--rw programmed-index?   uint64
+        |     +--ro state
+        |     |  +--ro index?              uint64
+        |     |  +--ro programmed-index?   uint64
+        |     +--rw encap-headers
+        |        +--rw encap-header* [index]
+        |           +--rw index     -> ../config/index
+        |           +--rw config
+        |           |  +--rw index?   uint8
+        |           |  +--rw type?    oc-aftt:encapsulation-header-type
+        |           +--ro state
+        |           |  +--ro index?   uint8
+        |           |  +--ro type?    oc-aftt:encapsulation-header-type
+        |           +--rw gre
+        |           |  +--rw config
+        |           |  |  +--rw src-ip?       oc-inet:ip-address
+        |           |  |  +--rw dst-ip?       oc-inet:ip-address
+        |           |  |  +--rw dst-prefix?   oc-inet:ip-prefix
+        |           |  |  +--rw ttl?          uint8
+        |           |  +--ro state
+        |           |     +--ro src-ip?       oc-inet:ip-address
+        |           |     +--ro dst-ip?       oc-inet:ip-address
+        |           |     +--ro dst-prefix?   oc-inet:ip-prefix
+        |           |     +--ro ttl?          uint8
+        |           +--rw ipv4
+        |           |  +--rw config
+        |           |  |  +--rw src-ip?       oc-inet:ip-address
+        |           |  |  +--rw dst-ip?       oc-inet:ip-address
+        |           |  |  +--rw dst-prefix?   oc-inet:ip-prefix
+        |           |  +--ro state
+        |           |     +--ro src-ip?       oc-inet:ip-address
+        |           |     +--ro dst-ip?       oc-inet:ip-address
+        |           |     +--ro dst-prefix?   oc-inet:ip-prefix
+        |           +--rw ipv6
+        |           |  +--rw config
+        |           |  |  +--rw src-ip?       oc-inet:ip-address
+        |           |  |  +--rw dst-ip?       oc-inet:ip-address
+        |           |  |  +--rw dst-prefix?   oc-inet:ip-prefix
+        |           |  +--ro state
+        |           |     +--ro src-ip?       oc-inet:ip-address
+        |           |     +--ro dst-ip?       oc-inet:ip-address
+        |           |     +--ro dst-prefix?   oc-inet:ip-prefix
+        |           +--rw mpls
+        |           |  +--rw config
+        |           |  |  +--rw traffic-class?   oc-mplst:mpls-tc
+        |           |  |  +--rw label?           oc-mplst:mpls-label
+        |           |  |  +--rw mpls-ttl?        uint8
+        |           |  +--ro state
+        |           |     +--ro traffic-class?   oc-mplst:mpls-tc
+        |           |     +--ro label?           oc-mplst:mpls-label
+        |           |     +--ro mpls-ttl?        uint8
+        |           +--rw udp-v4
+        |           |  +--rw config
+        |           |  |  +--rw src-ip?         oc-inet:ip-address
+        |           |  |  +--rw dst-ip?         oc-inet:ip-address
+        |           |  |  +--rw dst-prefix?     oc-inet:ip-prefix
+        |           |  |  +--rw dscp?           oc-inet:dscp
+        |           |  |  +--rw src-udp-port?   oc-inet:port-number
+        |           |  |  +--rw dst-udp-port?   oc-inet:port-number
+        |           |  |  +--rw ip-ttl?         uint8
+        |           |  +--ro state
+        |           |     +--ro src-ip?         oc-inet:ip-address
+        |           |     +--ro dst-ip?         oc-inet:ip-address
+        |           |     +--ro dst-prefix?     oc-inet:ip-prefix
+        |           |     +--ro dscp?           oc-inet:dscp
+        |           |     +--ro src-udp-port?   oc-inet:port-number
+        |           |     +--ro dst-udp-port?   oc-inet:port-number
+        |           |     +--ro ip-ttl?         uint8
+        |           +--rw udp-v6
+        |              +--rw config
+        |              |  +--rw src-ip?         oc-inet:ip-address
+        |              |  +--rw dst-ip?         oc-inet:ip-address
+        |              |  +--rw dst-prefix?     oc-inet:ip-prefix
+        |              |  +--rw dscp?           oc-inet:dscp
+        |              |  +--rw src-udp-port?   oc-inet:port-number
+        |              |  +--rw dst-udp-port?   oc-inet:port-number
+        |              |  +--rw ip-ttl?         uint8
+        |              +--rw state
+        |                 +--rw src-ip?         oc-inet:ip-address
+        |                 +--rw dst-ip?         oc-inet:ip-address
+        |                 +--rw dst-prefix?     oc-inet:ip-prefix
+        |                 +--rw dscp?           oc-inet:dscp
+        |                 +--rw src-udp-port?   oc-inet:port-number
+        |                 +--rw dst-udp-port?   oc-inet:port-number
+        |                 +--rw ip-ttl?         uint8
         +--ro afts
         |  +--ro ipv4-unicast
         |  |  +--ro ipv4-entry* [prefix]
         |  |     +--ro prefix    -> ../state/prefix
         |  |     +--ro state
         |  |        +--ro prefix?                                     oc-inet:ipv4-prefix
         |  |        +--ro counters
         |  |        |  +--ro packets-forwarded?          oc-yang:counter64
         |  |        |  +--ro octets-forwarded?           oc-yang:counter64
         |  |        |  +--ro packets-forwarded-backup?   oc-yang:counter64
         |  |        |  +--ro octets-forwarded-backup?    oc-yang:counter64
         |  |        +--ro entry-metadata?                             binary
         |  |        +--ro origin-protocol?                            identityref
         |  |        +--ro decapsulate-header?                         oc-aftt:encapsulation-header-type
         |  |        +--ro oc-aftni:next-hop-group?                    -> /oc-ni:network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id
         |  |        +--ro oc-aftni:next-hop-group-network-instance?   oc-ni:network-instance-ref
         |  |        +--ro oc-aftni:origin-network-instance?           oc-ni:network-instance-ref
         |  +--ro ipv6-unicast
         |  |  +--ro ipv6-entry* [prefix]
         |  |     +--ro prefix    -> ../state/prefix
@@ -3645,49 +3755,54 @@
         |              +--ro oc-aftsummary:state
         |                 +--ro oc-aftsummary:origin-protocol?   identityref
         |                 +--ro oc-aftsummary:counters
         |                    +--ro oc-aftsummary:aft-entries?   uint64
         +--rw protocols
         |  +--rw protocol* [identifier name]
         |     +--rw identifier          -> ../config/identifier
         |     +--rw name                -> ../config/name
         |     +--rw config
         |     |  +--rw identifier?       identityref
         |     |  +--rw name?             string
         |     |  +--rw enabled?          boolean
         |     |  +--rw default-metric?   uint32
         |     +--ro state
         |     |  +--ro identifier?       identityref
         |     |  +--ro name?             string
         |     |  +--ro enabled?          boolean
         |     |  +--ro default-metric?   uint32
         |     +--rw static-routes
         |     |  +--rw static* [prefix]
-        |     |     +--rw prefix       -> ../config/prefix
+        |     |     +--rw prefix            -> ../config/prefix
         |     |     +--rw config
         |     |     |  +--rw prefix?        inet:ip-prefix
         |     |     |  +--rw set-tag?       oc-pt:tag-type
         |     |     |  +--rw description?   string
         |     |     +--ro state
         |     |     |  +--ro prefix?        inet:ip-prefix
         |     |     |  +--ro set-tag?       oc-pt:tag-type
         |     |     |  +--ro description?   string
+        |     |     +--rw next-hop-group
+        |     |     |  +--rw config
+        |     |     |  |  +--rw id?   -> /network-instances/network-instance/next-hop-groups/next-hop-group/name
+        |     |     |  +--ro state
+        |     |     |     +--ro id?   -> /network-instances/network-instance/next-hop-groups/next-hop-group/name
         |     |     +--rw next-hops
         |     |        +--rw next-hop* [index]
         |     |           +--rw index            -> ../config/index
         |     |           +--rw config
         |     |           |  +--rw index?        string
         |     |           |  +--rw next-hop?     union
         |     |           |  +--rw recurse?      boolean
         |     |           |  +--rw metric?       uint32
         |     |           |  +--rw preference?   uint32
         |     |           +--ro state
         |     |           |  +--ro index?        string
         |     |           |  +--ro next-hop?     union
         |     |           |  +--ro recurse?      boolean
         |     |           |  +--ro metric?       uint32
         |     |           |  +--ro preference?   uint32
         |     |           +--rw enable-bfd
         |     |           |  +--rw config
         |     |           |  |  +--rw enabled?                       boolean
         |     |           |  |  +--rw desired-minimum-tx-interval?   uint32
         |     |           |  |  +--rw required-minimum-receive?      uint32

Flatten view

@@ existing paths omitted for brevity @@
 /openconfig-network-instance:network-instances/network-instance/name
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/config
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/config/id
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/config/name
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/config/programmed-id
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/name
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/next-hops
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/next-hops/next-hop
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/next-hops/next-hop/config
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/next-hops/next-hop/config/index
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/next-hops/next-hop/config/weight
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/next-hops/next-hop/index
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/next-hops/next-hop/state
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/next-hops/next-hop/state/index
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/next-hops/next-hop/state/weight
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/state
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/state/id
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/state/name
+/openconfig-network-instance:network-instances/network-instance/next-hop-groups/next-hop-group/state/programmed-id
+/openconfig-network-instance:network-instances/network-instance/next-hops
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/config
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/config/index
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/config/programmed-index
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/config
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/config/index
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/config/type
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/gre
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/gre/config
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/gre/config/dst-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/gre/config/dst-prefix
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/gre/config/src-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/gre/config/ttl
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/gre/state
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/gre/state/dst-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/gre/state/dst-prefix
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/gre/state/src-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/gre/state/ttl
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/index
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv4
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv4/config
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv4/config/dst-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv4/config/dst-prefix
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv4/config/src-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv4/state
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv4/state/dst-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv4/state/dst-prefix
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv4/state/src-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv6
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv6/config
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv6/config/dst-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv6/config/dst-prefix
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv6/config/src-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv6/state
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv6/state/dst-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv6/state/dst-prefix
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/ipv6/state/src-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/mpls
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/mpls/config
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/mpls/config/label
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/mpls/config/mpls-ttl
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/mpls/config/traffic-class
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/mpls/state
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/mpls/state/label
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/mpls/state/mpls-ttl
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/mpls/state/traffic-class
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/state
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/state/index
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/state/type
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/config
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/config/dscp
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/config/dst-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/config/dst-prefix
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/config/dst-udp-port
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/config/ip-ttl
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/config/src-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/config/src-udp-port
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/state
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/state/dscp
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/state/dst-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/state/dst-prefix
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/state/dst-udp-port
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/state/ip-ttl
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/state/src-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v4/state/src-udp-port
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/config
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/config/dscp
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/config/dst-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/config/dst-prefix
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/config/dst-udp-port
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/config/ip-ttl
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/config/src-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/config/src-udp-port
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/state
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/state/dscp
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/state/dst-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/state/dst-prefix
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/state/dst-udp-port
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/state/ip-ttl
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/state/src-ip
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/encap-headers/encap-header/udp-v6/state/src-udp-port
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/index
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/state
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/state/index
+/openconfig-network-instance:network-instances/network-instance/next-hops/next-hop/state/programmed-index
 /openconfig-network-instance:network-instances/network-instance/openconfig-flexalgo:flex-algorithm
 /openconfig-network-instance:network-instances/network-instance/openconfig-flexalgo:flex-algorithm/flex-algo-global-attributes
@@ existing paths omitted for brevity @@
 /openconfig-network-instance:network-instances/network-instance/protocols/protocol/static-routes/static/config/prefix
 /openconfig-network-instance:network-instances/network-instance/protocols/protocol/static-routes/static/config/set-tag
+/openconfig-network-instance:network-instances/network-instance/protocols/protocol/static-routes/static/next-hop-group
+/openconfig-network-instance:network-instances/network-instance/protocols/protocol/static-routes/static/next-hop-group/config
+/openconfig-network-instance:network-instances/network-instance/protocols/protocol/static-routes/static/next-hop-group/config/id
+/openconfig-network-instance:network-instances/network-instance/protocols/protocol/static-routes/static/next-hop-group/state
+/openconfig-network-instance:network-instances/network-instance/protocols/protocol/static-routes/static/next-hop-group/state/id
 /openconfig-network-instance:network-instances/network-instance/protocols/protocol/static-routes/static/next-hops
 /openconfig-network-instance:network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop

@robshakir
Copy link
Contributor

Dan, thanks for the contribution!

I'm not sure that this should be modelled this way. A few concerns:

  • we now have a new next-hop-groups at the /network-instances/network-instance level, which doesn't really relate to any feature. This at least should be grouped under something (e.g., should it be under the static route protocol, or policy forwarding?)
  • we need to decide whether this static encapsulation can sit within policy-forwarding like GRE encapsulation does. today, we have /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre -- in this case, we created a new AFT-like construct to be able to do this. I think this should probably live within policy-forwarding as with the other encapsulation use cases.
  • if we're re-using the AFT definitions -- let's just re-use the groupings rather than create a whole new model that duplicates a bunch of the content.

Happy to discuss further.

@robshakir
Copy link
Contributor

robshakir commented Dec 18, 2024

I see the discussion in #1208 that covered the objection to this being in policy-forwarding. If the problem is that this does not allow matching on specific policies, then that's OK -- but let's find somewhere other than straight in network-instances for it to live.

If this is always going to be specified via a static route -- then I suggest that we have this configured under the static routing sections of the model.

I'd like to understand what the plan is to make this consistent with GRE encapsulation. (i.e., will we deprecate encapsulate-gre).

There's some history of how this is modelled here: https://drive.google.com/file/d/1GVzP6ZQFlvbZvdLSZnhYlwrL6AIaLJl-/view?usp=sharing

@dplore
Copy link
Member

dplore commented Dec 18, 2024

I see the discussion in #1208 that covered the objection to this being in policy-forwarding. If the problem is that this does not allow matching on specific policies, then that's OK -- but let's find somewhere other than straight in network-instances for it to live.

If this is always going to be specified via a static route -- then I suggest that we have this configured under the static routing sections of the model.

I'd like to understand what the plan is to make this consistent with GRE encapsulation. (i.e., will we deprecate encapsulate-gre).

There's some history of how this is modelled here: https://drive.google.com/file/d/1GVzP6ZQFlvbZvdLSZnhYlwrL6AIaLJl-/view?usp=sharing

I actually recommended to Dan that we create next-hop-groups at this level. I'm happy to entertain some other suggestion though?

The intended concept is these user defined next-hop-groups are the static equivalent of gRIBI programmed next-hop-groups. User defined next-hop-groups (and their child next-hops) can be referenced by static-routes, policy-forwarding and generically anything that would set or reference (user defined) next-hop-groups.

WDYT?

@dplore
Copy link
Member

dplore commented Dec 18, 2024

/gcbrun

@OpenConfigBot
Copy link

No major YANG version changes in commit e68b038

@robshakir
Copy link
Contributor

I see the discussion in #1208 that covered the objection to this being in policy-forwarding. If the problem is that this does not allow matching on specific policies, then that's OK -- but let's find somewhere other than straight in network-instances for it to live.
If this is always going to be specified via a static route -- then I suggest that we have this configured under the static routing sections of the model.
I'd like to understand what the plan is to make this consistent with GRE encapsulation. (i.e., will we deprecate encapsulate-gre).
There's some history of how this is modelled here: https://drive.google.com/file/d/1GVzP6ZQFlvbZvdLSZnhYlwrL6AIaLJl-/view?usp=sharing

I actually recommended to Dan that we create next-hop-groups at this level. I'm happy to entertain some other suggestion though?

The intended concept is these user defined next-hop-groups are the static equivalent of gRIBI programmed next-hop-groups. User defined next-hop-groups (and their child next-hops) can be referenced by static-routes, policy-forwarding and generically anything that would set or reference (user defined) next-hop-groups.

WDYT?

I think this is quite messy. There are some implementation questions I have here (why not just inject these via gRIBI is one -- we can take this offline) -- but generally, I think that we don't have a general purpose way in existing implementations to create gRIBI-like NHGs+NHs that are re-used across protocols. Can we point to multiple implementations that look like this?

I would prefer that we map this in a way that:

a) makes it really clear what the entries that we are creating are and how they can be used,
b) aligns with constructs that are familiar to network operators and implementors,
c) (and least important) doesn't recreate a lot of duplicate YANG.

What is the specification that is being asked for here? Is it to require this to be re-used across policy-forwarding and static or is it simply within static? What is the use case for the one that we're not asking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready to discuss
Development

Successfully merging this pull request may close these issues.

4 participants